/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #0f0f23;
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
    transition: all 0.3s ease;
}

/* 浅色主题 */
body.light-theme {
    background-color: #f8f9fa;
    color: #333333;
}

.container {
    display: flex;
    height: 100vh;
}

/* 左侧导航栏 */
.sidebar {
    width: 280px;
    background-color: #1a1a2e;
    border-right: 1px solid #2d2d44;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

body.light-theme .sidebar {
    background-color: #ffffff;
    border-right: 1px solid #e9ecef;
}

/* 侧边栏收起状态 */
.sidebar.collapsed {
    width: 60px;
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .new-chat-btn span,
.sidebar.collapsed .chat-history h3,
.sidebar.collapsed .chat-item span,
.sidebar.collapsed .chat-item i,
.sidebar.collapsed .settings-btn span {
    display: none;
}

.sidebar.collapsed .sidebar-content {
    overflow: hidden;
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar.collapsed .chat-item {
    justify-content: center;
    padding: 10px;
}

.sidebar.collapsed .new-chat-btn {
    justify-content: center;
    padding: 12px;
}

.sidebar.collapsed .settings-btn {
    justify-content: center;
    padding: 10px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #2d2d44;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.light-theme .sidebar-header {
    border-bottom: 1px solid #e9ecef;
}

.sidebar-header h2 {
    color: #64ffda;
    font-size: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

body.light-theme .sidebar-header h2 {
    color: #007bff;
}

.sidebar-header i {
    margin-right: 10px;
}

.sidebar-toggle {
    background: transparent;
    border: 1px solid #2d2d44;
    border-radius: 6px;
    color: #a0a0a0;
    cursor: pointer;
    padding: 6px 8px;
    transition: all 0.2s ease;
}

body.light-theme .sidebar-toggle {
    border: 1px solid #e9ecef;
    color: #6c757d;
}

.sidebar-toggle:hover {
    background-color: #2d2d44;
    color: #ffffff;
}

body.light-theme .sidebar-toggle:hover {
    background-color: #f8f9fa;
    color: #333333;
}

.sidebar-toggle i {
    transition: transform 0.3s ease;
}

.sidebar-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.new-chat-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chat-history h3 {
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

body.light-theme .chat-history h3 {
    color: #6c757d;
}

.chat-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #d0d0d0;
}

body.light-theme .chat-item {
    color: #495057;
}

.chat-item:hover {
    background-color: #2d2d44;
}

body.light-theme .chat-item:hover {
    background-color: #f8f9fa;
}

.chat-item.active {
    background-color: #3a3a5a;
    color: #64ffda;
}

body.light-theme .chat-item.active {
    background-color: #e3f2fd;
    color: #007bff;
}

.chat-item i {
    margin-right: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.chat-title {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #2d2d44;
}

body.light-theme .sidebar-footer {
    border-top: 1px solid #e9ecef;
}

.settings-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid #2d2d44;
    border-radius: 6px;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.light-theme .settings-btn {
    border: 1px solid #e9ecef;
    color: #6c757d;
}

.settings-btn:hover {
    background-color: #2d2d44;
    color: #ffffff;
}

body.light-theme .settings-btn:hover {
    background-color: #f8f9fa;
    color: #333333;
}

/* 主内容区域 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #0f0f23;
    margin-left: 0;
    transition: all 0.3s ease;
    position: relative;
}
body.light-theme .main-content {
    background-color: #f8f9fa;
}

/* 侧边栏收起时主内容区域调整 */
.sidebar.collapsed + .main-content {
    margin-left: 0;
}

/* 顶部栏 */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 15px 30px;
    background-color: #1a1a2e;
    border-bottom: 1px solid #2d2d44;
}

body.light-theme .top-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #e9ecef;
}

.top-actions {
    display: flex;
    gap: 10px;
}

.theme-toggle, .user-menu {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #2d2d44;
    border-radius: 6px;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.light-theme .theme-toggle,
body.light-theme .user-menu {
    border: 1px solid #e9ecef;
    color: #6c757d;
}

.theme-toggle:hover, .user-menu:hover {
    background-color: #2d2d44;
    color: #ffffff;
}

body.light-theme .theme-toggle:hover,
body.light-theme .user-menu:hover {
    background-color: #f8f9fa;
    color: #333333;
}

/* 聊天区域 */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #0f0f23;
    margin: 0;
    align-items: center;
    padding-bottom: 194px; /* 输入框高度+底部间隔，适配不同屏幕可微调 */
}
body.light-theme .chat-area {
    background-color: #f8f9fa;
}

.chat-messages {
    width: 100%;
    max-width: 900px;
    margin: 0 auto 48px auto;
    padding: 20px 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1 1 auto;
    min-height: 0;
    height: calc(100vh - 60px - 194px);
}

.message {
    display: flex;
    gap: 15px;
    animation: fadeIn 0.3s ease;
}

.message.user {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, #64ffda 0%, #00bcd4 100%);
    color: #0f0f23;
}

body.light-theme .message.assistant .message-avatar {
    color: #ffffff;
}

.message-content {
    display: inline-block;
    max-width: 85%;
    min-width: 60px;
    word-break: break-all;
    white-space: pre-wrap;
    padding: 12px 18px;
    margin: 8px 0;
    border-radius: 12px;
    background: #f5f7fa;
    font-size: 16px;
    line-height: 1.7;
    box-sizing: border-box;
    position: relative;
}
.edit-btn, .download-btn {
  position: absolute;
  top: 18px;
  z-index: 2;
  font-size: 15px;
  padding: 2px 10px;
  height: 28px;
  line-height: 24px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.edit-btn { right: 20px; }
.download-btn { right: 82px; }
.message.user .message-content {
    text-align: right;
}

.message-text {
    /*display: flex;*/
    /*align-items: center;*/
    /*flex-direction: row;*/
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.message.user .message-text {
    background: #cad4ff;
    color: #333333;
}

.message.assistant .message-text {
    background-color: #2d2d44;
    color: #ffffff;
}

body.light-theme .message.assistant .message-text {
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #e9ecef;
}

.message-time {
    font-size: 12px;
    color: #a0a0a0;
    margin-top: 5px;
}

body.light-theme .message-time {
    color: #6c757d;
}

.chat-input-container {
    padding: 20px 0;
    background-color: transparent;
    border-top: 1px solid #2d2d44;
}

body.light-theme .chat-input-container {
    border-top: 1px solid #e9ecef;
}

.input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background-color: #2d2d44;
    border: 1px solid #3a3a5a;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 15px;
    position: relative;
}

body.light-theme .input-wrapper {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
}

.input-controls-left {
    position: absolute;
    left: 12px;
    bottom: 8px;
    z-index: 10;
}

.mode-buttons {
    display: flex;
    gap: 4px;
}

.mode-btn {
    padding: 4px 8px;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid rgba(100, 255, 218, 0.3);
    border-radius: 4px;
    color: #64ffda;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 10px;
    backdrop-filter: blur(10px);
}

body.light-theme .mode-btn {
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.3);
    color: #007bff;
}

.mode-btn:hover {
    background: rgba(100, 255, 218, 0.2);
    border-color: rgba(100, 255, 218, 0.5);
}

body.light-theme .mode-btn:hover {
    background: rgba(0, 123, 255, 0.2);
    border-color: rgba(0, 123, 255, 0.5);
}

.mode-btn.active {
    background: #64ffda;
    color: #0f0f23;
    border-color: #64ffda;
}

body.light-theme .mode-btn.active {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.message-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 14px;
    resize: none;
    max-height: 120px;
    outline: none;
    padding: 8px 0 8px 120px;
}

body.light-theme .message-input {
    color: #333333;
}

.message-input::placeholder {
    color: #a0a0a0;
}

body.light-theme .message-input::placeholder {
    color: #6c757d;
}

.input-buttons {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.upload-btn {
    padding: 8px 12px;
    background: transparent;
    border: 1px solid #2d2d44;
    border-radius: 8px;
    color: #a0a0a0;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

body.light-theme .upload-btn {
    border: 1px solid #e9ecef;
    color: #6c757d;
}

.upload-btn:hover {
    background-color: #2d2d44;
    color: #ffffff;
}

body.light-theme .upload-btn:hover {
    background-color: #f8f9fa;
    color: #333333;
}

.send-btn {
    padding: 8px 12px;
    background: linear-gradient(135deg, #64ffda 0%, #00bcd4 100%);
    border: none;
    border-radius: 8px;
    color: #0f0f23;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(100, 255, 218, 0.3);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.send-btn.stop {
    background: #bdbdbd !important;
    color: #fff !important;
    border: none !important;
}
.send-btn.stop:hover {
    background: #9e9e9e !important;
    color: #fff !important;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background-color: #2d2d44;
    border-radius: 6px;
    font-size: 12px;
    color: #a0a0a0;
}

body.light-theme .file-info {
    background-color: #f8f9fa;
    color: #6c757d;
}

.file-info i {
    color: #64ffda;
}

body.light-theme .file-info i {
    color: #007bff;
}

.remove-file {
    background: transparent;
    border: none;
    color: #a0a0a0;
    cursor: pointer;
    padding: 2px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background-color: #3a3a5a;
    color: #ffffff;
}

body.light-theme .remove-file:hover {
    background-color: #e9ecef;
    color: #333333;
}

/* 动画 */
/* 测试用例表格样式 */
.test-cases-container {
    margin: 15px 0;
    animation: fadeIn 0.3s ease-in-out;
}

.test-cases-container h3 {
    color: #64ffda;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

body.light-theme .test-cases-container h3 {
    color: #007bff;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #2d2d44;
    background-color: #1a1a2e;
}

body.light-theme .table-wrapper {
    border: 1px solid #e9ecef;
    background-color: #ffffff;
}

.test-cases-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 800px;
}

.test-cases-table th {
    background-color: #2d2d44;
    color: #ffffff;
    font-weight: 600;
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid #3d3d54;
    white-space: nowrap;
}

body.light-theme .test-cases-table th {
    background-color: #f8f9fa;
    color: #333333;
    border-bottom: 1px solid #dee2e6;
}

.test-cases-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #2d2d44;
    color: #d0d0d0;
    vertical-align: top;
    word-wrap: break-word;
    max-width: 200px;
}

body.light-theme .test-cases-table td {
    border-bottom: 1px solid #e9ecef;
    color: #495057;
}

.test-cases-table tr:hover {
    background-color: #2d2d44;
}

body.light-theme .test-cases-table tr:hover {
    background-color: #f8f9fa;
}

.test-cases-table tr:last-child td {
    border-bottom: none;
}

/* 响应式表格 */
@media (max-width: 768px) {
    .test-cases-table {
        font-size: 12px;
        min-width: 600px;
    }
    
    .test-cases-table th,
    .test-cases-table td {
        padding: 8px 6px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes typing {
    0%, 20% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

.typing-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    border-radius: 50%;
    background-color: #bbb;
    animation: typing 1s infinite;
    vertical-align: middle;
    transition: opacity 0.1s ease;
}

/* 立即停止动画的类 */
.typing-indicator.stop-animation {
    animation: none;
    opacity: 0;
}

body.light-theme .typing-indicator {
    background-color: #bbb;
}
.typing-indicator:nth-child(1) { animation-delay: 0s; }
.typing-indicator:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator:nth-child(3) { animation-delay: 0.4s; }

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

body.light-theme ::-webkit-scrollbar-track {
    background: #f8f9fa;
}

::-webkit-scrollbar-thumb {
    background: #2d2d44;
    border-radius: 3px;
}

body.light-theme ::-webkit-scrollbar-thumb {
    background: #dee2e6;
}

::-webkit-scrollbar-thumb:hover {
    background: #3a3a5a;
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }
    
    .chat-area {
        margin: 0 15px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 200px;
    }
    
    .sidebar.collapsed {
        width: 100%;
    }
    
    .main-content {
        flex: 1;
        margin-left: 0;
    }
    
    .top-bar {
        padding: 10px 20px;
    }
    
    .chat-area {
        margin: 0 10px;
    }
    
    .chat-messages {
        padding: 15px 0;
    }
    
    .chat-input-container {
        padding: 15px 0;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .input-wrapper {
        margin-bottom: 10px;
    }
    
    .input-controls-left {
        left: 8px;
        bottom: 6px;
    }
    
    .message-input {
        padding: 6px 0 6px 100px;
    }
    
    .mode-btn {
        font-size: 9px;
        padding: 3px 6px;
    }
}

@media (max-width: 480px) {
    .sidebar-content {
        padding: 15px;
    }
    
    .chat-list {
        gap: 5px;
    }
    
    .chat-item {
        padding: 8px 10px;
    }
    
    .message {
        gap: 10px;
    }
    
    .message-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
    
    .message-text {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .upload-btn, .send-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .chat-area {
        margin: 0 5px;
    }
    
    .input-controls-left {
        left: 6px;
        bottom: 4px;
    }
    
    .message-input {
        padding: 4px 0 4px 90px;
    }
    
    .mode-btn {
        font-size: 8px;
        padding: 2px 4px;
    }
} 

/* 聊天输入框新布局样式 */
/* 聊天输入框固定底部并与聊天区域对齐 */
.chat-input-outer {
    left: 0;
    right: 0;
    bottom: 24px;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    background: transparent;
    width: 100%;
}

.chat-input-inner {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: #f5f6f8;
    border-radius: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    padding: 24px 32px 16px 32px;
    display: flex;
    flex-direction: column;
    position: relative;
}
body.light-theme .chat-input-inner {
    background: #fff;
}
body.dark-theme .chat-input-inner {
    background: #23243a;
}

.chat-input-main {
    width: 100%;
    display: flex;
    align-items: center;
}

.message-input {
    width: 100%;
    min-height: 36px;
    max-height: 120px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: #333;
    resize: none;
    outline: none;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}
body.dark-theme .message-input {
    color: #fff;
    background: transparent;
}

.chat-input-actions {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 16px;
}

.chat-input-actions-left {
    display: flex;
    gap: 12px;
}

.chat-input-actions-right {
    display: flex;
    gap: 12px;
}

.mode-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #333;
    border-radius: 20px;
    font-size: 14px;
    padding: 6px 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}
.mode-btn.active {
    background: #e6f7f5;
    border-color: #64ffda;
    color: #00bfae;
}
.mode-btn i {
    font-size: 16px;
}

.upload-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #333;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
}
.upload-btn:hover {
    background: #f0f0f0;
    border-color: #64ffda;
    color: #00bfae;
}

.send-btn {
    background: #e6f7f5;
    border: none;
    color: #00bfae;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin-left: 2px;
    cursor: pointer;
    transition: all 0.2s;
}
.send-btn:hover {
    background: #64ffda;
    color: #fff;
}

.file-info {
    margin-top: 10px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #333;
}
.file-info i {
    color: #00bfae;
}
.remove-file {
    background: transparent;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 15px;
    margin-left: 4px;
}
.remove-file:hover {
    color: #ff6b6b;
}

.file-size {
    color: #888;
    font-size: 12px;
    margin-left: 8px;
}
.upload-btn {
    position: relative;
}
.upload-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #00bfae;
    pointer-events: none;
}
.upload-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}
.upload-btn.uploading .upload-icon {
    display: none;
}
.upload-btn.uploading .upload-loading {
    display: flex !important;
}

@media (max-width: 900px) {
    .chat-input-inner, .chat-messages {
        max-width: 100%;
    }
    .chat-input-inner {
        padding: 16px 10px 10px 10px;
    }
}
@media (max-width: 600px) {
    .chat-input-inner {
        padding: 8px 2px 6px 2px;
    }
    .mode-btn, .upload-btn, .send-btn {
        font-size: 13px;
        padding: 4px 10px;
        width: 32px;
        height: 32px;
    }
    .chat-area {
        padding-bottom: 144px;
    }
    .chat-messages {
        height: calc(100vh - 50px - 144px);
    }
}

/* 侧边栏内部件圆角优化 */
.new-chat-btn,
.settings-btn {
    border-radius: 14px;
}

.chat-item {
    border-radius: 10px;
}

/* 深色模式下输入框优化 */
body.dark-theme .chat-input-inner {
    background: #23243a;
}
body.dark-theme .message-input {
    color: #fff;
    background: transparent;
}
body.dark-theme .mode-btn {
    background: #23243a;
    border: 1px solid #33395a;
    color: #64ffda;
}
body.dark-theme .mode-btn.active {
    background: #1a1a2e;
    border-color: #64ffda;
    color: #64ffda;
}
body.dark-theme .upload-btn {
    background: #23243a;
    border: 1px solid #33395a;
    color: #64ffda;
}
body.dark-theme .upload-btn:hover {
    background: #1a1a2e;
    border-color: #64ffda;
    color: #64ffda;
}
body.dark-theme .send-btn {
    background: #1a1a2e;
    color: #64ffda;
}
body.dark-theme .send-btn:hover {
    background: #64ffda;
    color: #23243a;
}
body.dark-theme .file-info {
    background: #23243a;
    color: #64ffda;
}
body.dark-theme .file-info i {
    color: #64ffda;
}
body.dark-theme .remove-file {
    color: #64ffda;
}
body.dark-theme .remove-file:hover {
    color: #ff6b6b;
}

.edit-btn {
  position: absolute;
  top: 25px;
  right: 30px;
  background: #f8f9fa;
  color: #007bff;
  border: none;
  border-radius: 14px;
  padding: 4px 12px 4px 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.edit-btn i {
  font-size: 13px;
}
.edit-btn:hover {
  background: #e3f2fd;
  color: #23243a;
  box-shadow: 0 4px 16px rgba(0,123,255,0.08);
}

/* 下载按钮样式 */
.download-btn {
  position: absolute;
  top: 25px;
  right: 100px;
  background: #f8f9fa;
  color: #007bff;
  border: none;
  border-radius: 14px;
  padding: 4px 12px 4px 10px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 2;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.download-btn i {
  font-size: 13px;
}

.download-btn:hover {
  background: #e3f2fd;
  color: #23243a;
  box-shadow: 0 4px 16px rgba(0,123,255,0.08);
}

/* 下载对话框样式 */
.download-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.download-modal-content {
  background: #1a1a2e;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

body.light-theme .download-modal-content {
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.download-modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid #2d2d44;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.light-theme .download-modal-header {
  border-bottom: 1px solid #e9ecef;
}

.download-modal-header h3 {
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

body.light-theme .download-modal-header h3 {
  color: #333333;
}

.close-btn {
  background: transparent;
  border: none;
  color: #a0a0a0;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: #2d2d44;
  color: #ffffff;
}

body.light-theme .close-btn:hover {
  background: #f8f9fa;
  color: #333333;
}

.download-modal-body {
  padding: 24px;
}

.download-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.download-option {
  background: #2d2d44;
  border: 1px solid #3d3d54;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #ffffff;
}

body.light-theme .download-option {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  color: #333333;
}

.download-option:hover {
  background: #3d3d54;
  border-color: #64ffda;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(100, 255, 218, 0.2);
}

body.light-theme .download-option:hover {
  background: #e9ecef;
  border-color: #007bff;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2);
}

.download-option i {
  font-size: 24px;
  color: #64ffda;
}

body.light-theme .download-option i {
  color: #007bff;
}

.download-option span {
  font-size: 14px;
  font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 600px) {
  .download-options {
    grid-template-columns: 1fr;
  }
  
  .download-modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .download-btn {
    right: 70px;
    padding: 4px 8px 4px 8px;
    font-size: 12px;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 浮动输入框初始状态 */
.floating-input {
  position: fixed !important;
  right: 50px;
  top: 50%;
  left: auto !important;
  bottom: auto !important;
  transform: translateY(-50%);
  width: 400px;
  z-index: 1000;
  transition: all 1.2s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 4px 24px rgba(0,0,0,0.12);
}

/* 首次进入页面悬浮输入框样式，主内容区中间，不改变原有大小样式 */
.floating-input-only {
  left: 50%;
  top: 50%;
  right: auto !important;
  bottom: auto !important;
  z-index: 1000;
  transition: all 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* 隐藏聊天消息区域，仅显示输入框 */
.hide-chat-messages .chat-messages {
  display: none !important;
}

/* 聊天输入框过渡动画 */
.chat-input-outer {
  transition: all 1.2s cubic-bezier(0.4,0,0.2,1);
}

/* 欢迎语样式 */
.welcome-tip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 140px;
  margin-bottom: 30px;
  animation: fadeIn 1s;
}
.welcome-title {
  font-size: 2.0rem;
  font-weight:400;
  color: #232222;
  margin-bottom: 20px;
}
.welcome-desc {
  font-weight:300;
  font-size: 0.9rem;
  color: #333333;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.with-table {
  min-width: 60px;
  margin: 8px 0;
  position: relative;
  max-width: 85%;
  padding: 12px 18px;
  background: #f5f7fa;
  border-radius: 12px;
  font-size: 16px;
}

.message-text.loading-dots {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: flex-start;
}